import java.util.*;
    public class NeighbouringNumbers 
         {
	     public static void main(String[] arg)
	       {
               Scanner in = new Scanner (System.in);
	       System.out.print ("Write number of array:");
	       int arrayElements = in.nextInt();
	       int[] arrayNumber = new int[arrayElements];
		     if(arrayNumber.length < 2)
                             {
			     System.out.println ("Write more then 2 elements");
			     return;
		             }
			     System.out.println ("Fill array");
		
		                     for (int count = 0; count < arrayNumber.length; count++) 
		                       { 
			               System.out.println ("Array[" + count_element + "]:");
			               int valueOfElement = in.nextInt();
			               arrayNumber[count_element] = valueOfElement;
		                       }
				
			int firstCompare = Math.abs(arrayNumber[0] - arrayNumber[1]);
		        int mindis = 0;

		                     for (int IndexArray = 0; IndexArray < arrayNumber.length - 1; IndexArray++)
		                       {
			              if (firstCompare > (Math.abs(arrayNumber[IndexArray] - arrayNumber[IndexArray + 1])))
                                         {
				         firstCompare = (Math.abs(arrayNumber[IndexArray] - arrayNumber[IndexArray + 1]));
				         mindis = IndexArray;
			                 }
		                       }
		        System.out.println ("INDEX:" + mindis);
	       }
         }
		
		
	
	